﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<KaoWuYou.Models.IndexModel>" %>

<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">

    <div class="navi">
        <div class="pageTitle">
            <h1>试卷分类导航</h1>
        </div>
        <ul class="subfield">
         <% if (Model.Subjects != null) foreach (var subject in Model.Subjects)
            { %>
                <li>
                    <div class="titlefield">
                        <%: subject.SubjectName%>
                        <span class="right"></span>
                    </div>
                    <div class="clear"></div>
                    <ul class="contentfield">
                     <% if (subject.Subclasses != null) foreach (var subclass in subject.Subclasses)
                        { %>
                            <li>
                                <%: Html.ActionLink(subclass.SubclassName, "TestPaperList", 
                                new
                                {
                                    SubjectID = subject.SubjectID,
                                    SubclassID = subclass.SubclassID,
                                    Page = 1
                                })%>
                            </li>
                     <% } %>
                    </ul>
                </li>
                <div class="clear"></div>
                <br />
         <% } %>
        </ul>
    </div>

</asp:Content>
